package com.zygh.sendmail.module.mapper;

import com.zygh.sendmail.module.entity.V1RestrictionAlgorithm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ms
 * @since 2021-02-23
 */
public interface V1RestrictionAlgorithmMapper extends BaseMapper<V1RestrictionAlgorithm> {

    @Select("select count(*) from v1_restriction_algorithm where to_date(cjsj,'yyyy-MM-dd')=CURRENT_DATE UNION all\n" +
            "select count(*) from v1_restriction_algorithm where to_date(cjsj,'yyyy-MM-dd')=CURRENT_DATE and sfsc=1 UNION all\n" +
            "select count(*) from v2_restriction_algorithm where to_date(cjsj,'yyyy-MM-dd')=CURRENT_DATE and sfsc=1 UNION all\n" +
            "select count(*) from v2_illegal_parking where to_date(cjsj,'yyyy-MM-dd')=CURRENT_DATE and sfsc=1")
    List<String> patrol();
}
